home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 26 / AACD 26.iso / AACD / System / MagnumOpus / Magnum_Opus.Install < prev    next >
Encoding:
Text File  |  1998-10-15  |  11.5 KB  |  378 lines

  1.  
  2. ; $VER: Magnum_Opus.Install 1.7 (11.10.98)
  3.  
  4. ; Copyright © 1996-1998 Richard Lane.
  5.  
  6. ;#############################################################################
  7. ;# Here is a special note for those people who like to hack other            #
  8. ;# peoples installation scripts. LEAVE THIS ALONE. It works very well        #
  9. ;# without you interfering with it. However, if you think it can be improved #
  10. ;# give me a call. My details can be found in the Magnum_Opus.Guide in the   #
  11. ;# "Help" drawer.                                                            #
  12. ;#############################################################################
  13.  
  14. (set #welcome
  15.   (cat "\nMagnum Opus V3.1 Installation.\n"
  16.        "Copyright © 1996 - 1998 Richard Lane."
  17.   )
  18. )
  19.  
  20. (welcome #welcome)
  21. (complete 3)
  22.  
  23. ;================================================
  24. ; First check that the assign to DOpus5: exists.
  25.  
  26. (set #no-opus (cat "You don't appear to have Directory Opus V5.661 or above installed.\n"
  27.                    "\nIf you do NOT start Directory Opus when booting, Please load it"
  28.                    "\nand run this installation script again.")
  29. )
  30. (if (not (exists "DOpus5:DirectoryOpus"))
  31.     (abort #no-opus)
  32. )
  33. (complete 5)
  34. ;================================================
  35. ; Warn the user if they're running a Kickstart 2 Amiga.
  36. ; If it's a Kickstart 1.x Amiga then DOpus will NOT install in the first
  37. ; place and the above will pick this up, clever huh.
  38.  
  39. (if (< (/ (getversion) 65536) 38)
  40.         (message "IMPORTANT NOTICE\n\nYou are using a Workbench 2.x Amiga.\n\n"
  41.         "Magnum Opus V3.1 has not been tested with this but should work OK\n"
  42.         "Please select what you want you want to do ?")
  43. )
  44. (complete 8)
  45. ;================================================
  46. ; Now to check and display the version of Directory Opus in use.
  47.  
  48. (set vernum (getversion "DOpus5:DirectoryOpus"))
  49. (set ver (/ vernum 65536))
  50. (set rev (- vernum (* ver 65536) ) )
  51.  
  52. (message ("\nDirectory Opus V5.661 or greater is required\n\nyou have version %ld.%ld" ver rev)
  53. )
  54. (complete 10)
  55.  
  56. (set #update
  57.      (askchoice
  58.     (prompt "Please select an option.")
  59.     (help "Select the \"Update Magnum Opus V3.0 to V3.1\" option if you have "
  60.               "previously installed version 3.0.\n"
  61.               "If you have previously installed Magnum Opus V1.0 - V2.2 or "
  62.               "have never installed it before, select the "
  63.               "\"Install Magnum Opus V3.1\" option.")
  64.     (choices "Update Magnum Opus V3.0 to V3.1" "Install Magnum Opus V3.1")
  65.      )
  66. )
  67. (complete 20)
  68. ;================================================
  69. ; Here's the bit that does the updating of version 3.0 to 3.1.
  70. ; Complex bitch ain't it, but it sure looks pretty.
  71.  
  72. (set #icontt
  73.   (cat "\nThis sets the correct default tooltype and stack size for the Magnum_Opus.Guide "
  74.        "icon. It is strongly recommended that you click on Proceed.")
  75. )
  76.  
  77. ;This is 700 blocks for safety/backups, 694 blocks needed for update
  78. (set #no-spaceupdate (cat
  79.     "You need at least 358,400 bytes of disk space\n"
  80.     "on the partition where Opus Magellan is installed\n")
  81. )
  82.  
  83. (if (= #update 0)
  84.  (
  85.   (message "\nThis will update the Magnum_Opus.Guide, "
  86.            "install 14 new and 6 updated filetypes in"
  87.            " \"DOpus5:Filetypes\" "
  88.   )
  89.  
  90.   (if (< (getdiskspace "DOpus5:") 358400)
  91.        (abort #no-spaceupdate)
  92.   )
  93.  
  94. (complete 40)
  95.  
  96.   (copylib
  97.           (prompt "Copying Help file")
  98.           (help @copylib-help)
  99.           (Source "help/Magnum_Opus.Guide")
  100.           (dest "DOpus5:Help")
  101.           (confirm)
  102.           (infos)              ;I want the new icon installed as this has the
  103.           (noposition)         ;proper copyright message in it.
  104.           (optional "force")
  105.   )
  106.  
  107. (complete 60)
  108.  
  109.   (tooltype
  110.            (Prompt "Setting the correct tooltype & stack size in the Magnum_Opus.Guide.")
  111.            (help #icontt)
  112.            (dest "DOpus5:Help/Magnum_Opus.Guide")
  113.            (setdefaulttool "Multiview")
  114.            (setstack 4096)
  115.            (confirm)
  116.   )
  117.  
  118. (complete 80)
  119.  
  120.   (Working "Unpacking extra Filetypes... This may take a while so please be patient")
  121.  
  122.   (run "Filetypes/filetypes2.run >CON:0/0/500/100/Magnum_Opus_3.1-UPDATE/ DOpus5:")
  123.  
  124.  
  125.  
  126. (complete 100)
  127.  
  128.   (run "SYS:Utilities/Multiview DOpus5:Help/Magnum_Opus.Guide WINDOW"
  129.       (Help "I'll give you a clue, click Proceed.")
  130.       (prompt "\nDo you want to read the Magnum_Opus V3.1 AmigaGuide ?")
  131.       (confirm)
  132.   )
  133.  
  134.   (exit
  135.        "Updating of Magnum Opus to version 3.1 complete"
  136.        (quiet)
  137.   )
  138.  )
  139. )
  140.  
  141. ;#### Installer jumps here if FULL install selected. ####
  142.  
  143. ;This is (approx) 1758 blocks for safety/backups approx 1564 blocks needed for full install of 3.1.
  144.  
  145. (set #no-space (cat
  146.               "You need at least 900,000 bytes of disk space\n"
  147.               "on the partition where Opus Magellan is installed\n")
  148. )
  149. (if (< (getdiskspace "DOpus5:") 900000)
  150.        (abort #no-space)
  151. )
  152. (complete 25)
  153.  
  154. ;================================================
  155. ; Check for and remove obsolete parts.
  156.  
  157.  
  158. (delete "DOpus5:Buttons/ExampleButtons"
  159.         "DOpus5:Buttons/ExampleButtons2"
  160.         "DOpus5:Buttons/ExampleButtons5.11"
  161.         "DOpus5:Buttons/Magnum_Opus_Toolbar"
  162.         "DOpus5:ARexx/Back.DOpus5"
  163.         "DOpus5:ARexx/ARexx.1"
  164.         "DOpus5:Help/ARexx.1"
  165.         "DOpus5:Help/Good.requester"
  166.         "DOpus5:Help/moo"
  167.         (prompt "\nNow checking for previous installations of Magnum Opus "
  168.                 "versions 1.0 - 2.2 and removing obsolete parts.")
  169.         (help "\nThis part of the installation ONLY removes obsolete files "
  170.               "that are no longer required. You can safely select Proceed.")
  171.         (optional "force")
  172.         (confirm)
  173.         (infos)
  174. )
  175. (complete 30)
  176. ;================================================
  177. ;This is a new safety check to stop people who have installed a previous
  178. ;copy overwriting their original filetypes even if they did not rename
  179. ;their "Filetypes_Original" directory. It also stops a problem with
  180. ;the following functions failing if the Filetypes_Original directory
  181. ;is delete protected.
  182.  
  183. (set #old-filetypes (cat
  184.           "You already have backed up filetypes in\n"
  185.           " \"DOpus5:Filetypes_ORIGINAL\" \n"
  186.           "from a previous installation of Magnum Opus. "
  187.           "Please rename or delete this directory before installing "
  188.           "Magnum Opus version 3.1")
  189. )
  190.  
  191. (if (exists "DOpus5:Filetypes_ORIGINAL")
  192. (abort #old-filetypes)
  193. )
  194. (complete 35)
  195.  
  196. ;=================================================
  197. ;Main filetype installation
  198.  
  199. (message
  200.  "\nThe installer will now backup your current filetypes to a directory called \n"
  201.  "\"Filetypes_ORIGINAL.\""
  202.  "\nPlease Note! If you need to run this installation again please rename this directory."
  203.  "\n\nAfter this has been done the new Magnum Opus 3.1 filetypes will be installed into Opus Magellan.\n\n"
  204.  (all)
  205. )
  206.  
  207. (rename "DOpus5:Filetypes" "DOpus5:Filetypes_ORIGINAL"
  208.         (prompt "Backing Up current filetypes")
  209. )
  210.  
  211. (
  212.  (Working "Unpacking Filetypes...This may take a while so please be patient")
  213.  (run "Filetypes/Filetypes.run >CON:0/0/500/100/Magnum_Opus_3.0/ DOpus5:")
  214. )
  215.  
  216. (complete 40)
  217.  
  218. (
  219.  (Working "Unpacking extra Filetypes... This may take a while so please be patient")
  220.  (run "Filetypes/filetypes2.run >CON:0/0/500/100/Magnum_Opus_3.1-UPDATE/ DOpus5:")
  221. )
  222.  
  223. (complete 45)
  224. ;================================================
  225. ; Now for the Help files.
  226. ; As there's a version string in the AmigaGuide file we can do a copylib.
  227.  
  228. (copylib
  229.          (prompt "Copying Help file")
  230.          (help @copylib-help)
  231.          (Source "help/Magnum_Opus.Guide")
  232.          (dest "DOpus5:Help")
  233.          (confirm)
  234.          (infos)              ;I want the new icon installed as this has the
  235.          (noposition)         ;proper copyright message in it.
  236.          (optional "force")
  237. )
  238.  
  239. (complete 50)
  240.  
  241. ; Just to make sure some bright spark hasn't set the wrong default tooltype.
  242. ; esspecially dam coverdisk compiliers, they're a pain in the arse when they do this.
  243. ; Never mind we have the technology to sort it out.
  244.  
  245. (set #icontt
  246. (cat "\nThis sets the correct default tooltype and stack size for the Magnum_Opus.Guide "
  247.      "icon. It is strongly recommended that you click on Proceed."
  248. ))
  249.  
  250. (tooltype
  251.         (Prompt "Setting the correct tooltype & stack size in the Magnum_Opus.Guide.")
  252.         (help #icontt)
  253.         (dest "DOpus5:Help/Magnum_Opus.Guide")
  254.         (setdefaulttool "Multiview")
  255.         (setstack 4096)
  256.         (confirm)
  257. )
  258.  
  259. (complete 55)
  260.  
  261. (copyfiles
  262.          (prompt "Copying additional Help file parts")
  263.          (help @copyfiles-help)
  264.          (Source "help")
  265.          (dest "DOpus5:Help")
  266.          (pattern "~(#?.Guide|#?.info)")  ;this really works ???? yep.
  267.          (optional "force")
  268. )
  269. (complete 65)
  270.                           ;No confirm option on this as these bits are needed
  271.                           ;and I want the new versions of these installed.
  272.  
  273. ; By default DOpus 5 doesn't install a Drawer icon for the Help directory, this
  274. ; will check if there is one from the MWB_DOpus8 part of the distribution or
  275. ; another allready installed. This will also make it easier for novice users
  276. ; to find the Magnum2 help file !
  277.  
  278. (if (NOT (exists "DOpus5:help.info"))
  279.     (copyfiles
  280.           (prompt "")
  281.           (help @copyfiles-help)
  282.           (source "Help.info")
  283.           (dest "DOpus5:")
  284.           (noposition)
  285.           (optional "force")
  286.     )
  287. )
  288. (complete 70)
  289. ;=================================================
  290. (message "\n\n Now for the modules, just one for now")
  291. (copylib
  292.          (prompt "Copying Help file")
  293.          (help @copylib-help)
  294.          (Source "Modules")
  295.          (dest "DOpus5:Modules")
  296.          (confirm)
  297.          (optional force)
  298. )
  299. (complete 75)
  300. ;================================================
  301. (message "\n\n Next the ARexx bits")
  302. (copyfiles
  303.          (prompt "Copying ARexx bits")
  304.          (help @copyfiles-help)
  305.          (Source "ARexx")
  306.          (dest "DOpus5:ARexx")
  307.          (pattern "#?")
  308.          (optional "force")
  309. )
  310. (complete 80)
  311. ;=================================================
  312. (copyfiles
  313.           (prompt "Copying Button Banks")
  314.           (help @copyfiles-help)
  315.           (source "Buttons")
  316.           (dest "DOpus5:Buttons")
  317.           (Pattern "#?")
  318.           (optional "force")
  319.           (infos)
  320. )
  321. (complete 85)
  322. ;=================================================
  323.  
  324. (message "Installing new ToolBar Images")
  325.  
  326. (copyfiles
  327.          (prompt "Copying NewImages3")
  328.          (help @copyfiles-help)
  329.          (Source "NewImages3")
  330.          (dest "DOpus5:NewImages3")
  331.          (pattern "#?")
  332.          (infos)
  333.          (noposition)
  334.          (optional "force")
  335. )
  336. (complete 90)
  337. ;=================================================
  338. (message "\n\n Now the icons")
  339. (copyfiles
  340.          (prompt "Copying Icons")
  341.          (help @copyfiles-help)
  342.          (Source "Icons")
  343.          (dest "DOpus5:Icons")
  344.          (pattern "#?")
  345.          (optional "force")
  346. )
  347. (complete 95)
  348.  
  349. (copyfiles
  350.          (prompt "and now the disk icons...")
  351.          (help @copyfiles-help)
  352.          (source "Disk_Icons")
  353.          (dest "DOpus5:Icons/Disk_Icons")
  354.          (pattern "#?")
  355.          (infos)
  356.          (noposition)
  357.          (optional "force")
  358. )
  359. (complete 100)
  360. ;=================================================
  361. (run "SYS:Utilities/Multiview DOpus5:Help/Magnum_Opus.Guide WINDOW"
  362.      (Help "I'll give you a clue, click Proceed.")
  363.      (prompt "\nDo you want to read the Magnum_Opus V3.1 AmigaGuide ?")
  364.      (confirm)
  365. )
  366.  
  367. (exit
  368.      "\nPlease read the AmigaGuide File called "
  369.      "\"Magnum_Opus.Guide\" which is now in "
  370.      "\"DOpus5:Help/\"\n\n"
  371.      "You will need to reboot for the new changes to take effect.\n\n"
  372.      "Don't forget that there is a drawer with some nice "
  373.      "Hard Disk icons in that you may like to use "
  374.      "Which can be found in \"DOpus5:Icons/Disk_Icons\"."
  375.      (quiet)
  376. )
  377.  
  378.